package com.itcc.service;

import com.itcc.config.SpringConfig;
import com.itcc.domain.Customer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringConfig.class)
public class CustomerServiceTest {

    @Autowired
    private CustomerService customerService;

    @Test
    public void customerTest(){
        List<Customer> customerList = customerService.selectCustomer();
        for (Customer customer : customerList){
            System.out.println(customer);
        }
    }
}
